import request from '@/config/axios'

// 投诉信息类型 VO
export interface ComplainTypeVO {
  id: number // 主键ID
  typeName: string // 类型名称：诈骗
  status: number // 类型状态
  visible: boolean // 是否可见
  sort: number // 显示顺序
  score: number // 分数
}

// 投诉信息类型 API
export const ComplainTypeApi = {
  // 查询投诉信息类型分页
  getComplainTypePage: async (params: any) => {
    return await request.get({ url: `/wine/complain-type/page`, params })
  },

  // 查询投诉信息类型详情
  getComplainType: async (id: number) => {
    return await request.get({ url: `/wine/complain-type/get?id=` + id })
  },

  // 新增投诉信息类型
  createComplainType: async (data: ComplainTypeVO) => {
    return await request.post({ url: `/wine/complain-type/create`, data })
  },

  // 修改投诉信息类型
  updateComplainType: async (data: ComplainTypeVO) => {
    return await request.put({ url: `/wine/complain-type/update`, data })
  },

  // 删除投诉信息类型
  deleteComplainType: async (id: number) => {
    return await request.delete({ url: `/wine/complain-type/delete?id=` + id })
  },

  // 导出投诉信息类型 Excel
  exportComplainType: async (params) => {
    return await request.download({ url: `/wine/complain-type/export-excel`, params })
  }
}